package com.yejiarong.elasticsearch.api.bean.request;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;

import java.util.Map;

/**
 * @author YeJR
 */
@Data
public class SaveRequestForm {

    /**
     * 索引
     */
    @NotBlank(message = "索引不能为空")
    private String index;

    /**
     * 文档ID
     */
    @NotBlank(message = "文档ID不能为空")
    private String documentId;

    /**
     * 文档Map
     */
    @NotEmpty(message = "文档内容不能为空")
    private Map<String, Object> document;
}
